/**
 * 模拟数据工具，用于在后端API未就绪时提供测试数据
 */

// 模拟系统信息
export const mockSystemInfo = {
  os: {
    distro: 'Ubuntu',
    release: '20.04 LTS',
    kernel: '5.4.0-81-generic',
    arch: 'x64',
    hostname: 'server-demo',
    uptime: 1209600 // 14天的秒数
  },
  cpu: {
    model: 'Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz',
    cores: 8,
    load: 35.8
  },
  memory: {
    total: 16.0,
    used: 8.2,
    free: 7.8,
    usedPercent: 51.2
  },
  disk: [
    {
      mount: '/',
      size: 512,
      used: 189,
      usedPercent: 37
    },
    {
      mount: '/home',
      size: 1024,
      used: 456,
      usedPercent: 44.5
    }
  ],
  processes: {
    all: 245,
    running: 3
  }
};

// 模拟服务状态
export const mockServices = {
  nginx: 'active',
  mysql: 'active',
  mongodb: 'inactive',
  redis: 'active',
  docker: 'inactive',
  ssh: 'active'
};

// 模拟应用列表
export const mockApps = {
  web: [
    {
      id: 'nginx',
      name: 'Nginx',
      description: '高性能Web服务器和反向代理',
      category: 'web',
      installed: true,
      running: true,
      version: '1.18.0'
    },
    {
      id: 'apache',
      name: 'Apache',
      description: '流行的Web服务器',
      category: 'web',
      installed: false
    }
  ],
  database: [
    {
      id: 'mysql',
      name: 'MySQL',
      description: '流行的关系型数据库',
      category: 'database',
      installed: true,
      running: true,
      version: '8.0.25'
    },
    {
      id: 'mongodb',
      name: 'MongoDB',
      description: '流行的NoSQL数据库',
      category: 'database',
      installed: false
    }
  ],
  cache: [
    {
      id: 'redis',
      name: 'Redis',
      description: '内存数据结构存储，可用作数据库、缓存和消息代理',
      category: 'cache',
      installed: true,
      running: true,
      version: '6.0.9'
    }
  ]
}; 